<?php

namespace App\Home;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\BaseController;
use Tymon\JWTAuth\Facades\JWTAuth;


class HomeSearchController extends BaseController
{
    public function home()
    {
        $user = JWTAuth::parseToken()->authenticate();
        $query = DB::table('anli');
        $results = $query->get();
        $data = [
            'query' => $results,
            'token' => $user->token
        ];
        return $this->create($data, '获取成功', 200);
    }
}
